# -*- coding: utf-8 -*-
"""
Created on Wed Apr  1 14:42:29 2020

@author: wjx
"""
"""
请通过分页的形式将数据展示出来。【文件非常大】
"""

def run():
    """
    主函数

    Returns
    -------
    None.

    """
    while True:
        num = int(input('请选择页码：'))
        per_page_count = 10
        #每页显示10条数据
        start = (num-1) * per_page_count
        end = num * per_page_count
       
        result = []
        count = 0
        with open('db1.txt','r',encoding='utf-8') as f:
            first_line = f.readline()
            for line in f:
                if count == end:
                    break
                if count >= start:
                    result.append(line)
            
                
                count += 1
        
        for i in range(len(result)):
            print(i+1,result[i])
    
    
if __name__ == '__main__':
    run()